﻿/*
* 作者:haojielyb
* 邮箱:haojielyb@qq.com
*/

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace demo.Core
{
    public class Cone : Entity, IEntitySeedData<Cone>
    {
        public String Name { get; set; }

        public Ctwo Two { get; set; }

        public IEnumerable<Cone> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new List<Cone>
            {
                new Cone { Id = 1, Name = " One Name1 "},
                new Cone { Id = 2, Name = " One Name2 "},
                new Cone { Id = 3, Name = " One Name3 "},
                new Cone { Id = 4, Name = " One Name4 "}
            };
        }
    }

    public class Ctwo : Entity, IEntitySeedData<Ctwo>
    {
        public String Name { get; set; }

        public IEnumerable<Ctwo> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new List<Ctwo>
            {
                new Ctwo { Id = 1, Name = " Two Name1 "},
                new Ctwo { Id = 2, Name = " Two Name2 "},
                new Ctwo { Id = 3, Name = " Two Name3 "},
                new Ctwo { Id = 4, Name = " Two Name4 "}
            };
        }
    }
}